package com.bbs.util;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

import org.apache.log4j.PropertyConfigurator;

import com.bbs.listener.ContextListener;

public class LogUtil {
	public void initializeLogger(){
		Properties prop = new Properties();
		InputStream is = null;
		try {
			is = ContextListener.class.getClassLoader().getResourceAsStream("Log4j.properties");
			prop.load(is);
		} catch (Exception e) {
			e.printStackTrace();
		}finally{
			if(is!=null){
				try {
					is.close();
				} catch (IOException e) {
					// TODO Auto-generated catch block
					e.printStackTrace();
				}
			}
		}
		PropertyConfigurator.configure(prop);
	}

}
